package com.xquant.system.api;

import com.xquant.common.core.constant.ServiceNameConstants;
import com.xquant.common.core.domain.R;
import com.xquant.system.api.factory.RemotePermFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 用户服务
 *
 * @author xquant
 */
@FeignClient(contextId = "remotePermService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemotePermFallbackFactory.class)
public interface RemotePermService
{
    /**
     * 根据类型过滤用户权限
     *
     * @param list 查询结果
     * @param authType 权限类型
     * @return 结果
     */
    @PostMapping(value ="/userPerm/filterAuth.action")
    public List<Map> getFilterAuth(@RequestBody List<Map> list, @RequestHeader("authType") String authType);

    /**
     * 获取用户权限标志
     *
     * @param authType 权限类型
     * @return 结果
     */
    @GetMapping(value ="/userPerm/getPermFlag.action")
    public String getPermFlag(@RequestParam("authType") String authType);

}
